package com.situ.service;

import com.situ.dao.FoodDAO;
import com.situ.pojo.Food;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class FoodServiceImpl implements FoodService {
    @Autowired
    FoodDAO dao;
    @Override
    public List<Food> queryall() {
        return dao.queryall();
    }

    @Override
    public Food queryById(int id) {
        return dao.queryById(id);
    }
}
